//
//  HCCallRecordsModel.m
//  HelloCall
//
//  Created by WangYongpeng on 13-9-26.
//  Copyright (c) 2013年 HC. All rights reserved.
//

#import "HCCallRecordsModel.h"

@implementation HCCallRecordsModel

@synthesize callRecordsArray = m_callRecordsArray;

static HCCallRecordsModel* g_defaultModel;

+ (HCCallRecordsModel*)defaultModel
{
    if (nil == g_defaultModel)
    {
        g_defaultModel = [[HCCallRecordsModel alloc] init];
    }
    return g_defaultModel;
}

- (id)init
{
    self = [super init];
    if (nil != self)
    {
        self.callRecordsArray = [NSMutableArray arrayWithCapacity:0];
    }
    
    return self;
}

- (void)dealloc
{
    self.callRecordsArray = nil;
    
    [super dealloc];
}

- (void)addCallRecord:(NSString*)record
{
    [self.callRecordsArray addObject:record];
    if ([self.delegate respondsToSelector:@selector(callRecordsDataUpdated)])
    {
        [self.delegate callRecordsDataUpdated];
    }
}

@end
